home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / IPP_0002.AS_ / ipp_0002.asp
Encoding:
Text File  |  2003-02-21  |  1.8 KB  |  68 lines

  1. ∩╗┐<%@ CODEPAGE=65001 %> 
  2. <%
  3. '------------------------------------------------------------
  4. '
  5. ' Microsoft Internet Printing Project
  6. '
  7. ' Copyright (c) Microsoft Corporation. All rights reserved.
  8. '
  9. '
  10. '------------------------------------------------------------
  11.     option explicit
  12. %>
  13. <!-- #include file = "ipp_util.inc" -->
  14. <%
  15.     CheckSession
  16.     Response.Expires = 0
  17.  
  18.     Dim strPrinter, strLocal, strJobEta
  19.     Dim objPrinter, objQueue
  20.     Const L_OpenPrinter_Text    = "Open Printer: %1"
  21.  
  22.     strPrinter = OleCvt.DecodeUnicodeName (request ("eprinter"))
  23.  
  24.     strLocal = session(LOCAL_SERVER)
  25.  
  26.     Set objQueue = GetObject("WinNT://" & session(COMPUTER) & "/" & strPrinter)
  27.  
  28.     Dim strTitle
  29.     Const L_PrinterOn_Text = "%1 on %2"
  30.  
  31.     strTitle = LARGE_FONT_TAG & RepString2(L_PrinterOn_Text, strCleanString (GetFriendlyName (objQueue.PrinterName, session(COMPUTER))), session(LOCAL_SERVER)) & END_FONT
  32.  
  33.     Set objPrinter = Server.CreateObject(PROGID_HELPER)
  34.     On Error Resume Next
  35.     objPrinter.open "\\" & session(COMPUTER) & "\" & strPrinter
  36.     If Err Then
  37.         Call ErrorHandler ( RepString1(L_OpenPrinter_Text, strPrinter) )
  38.     End If
  39.  
  40.     strJobEta = JobEtaInfo (objPrinter)
  41.  
  42.     objPrinter.Close
  43.  
  44. %>
  45.  
  46. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  47. <html lang=<%=L_Language%>>
  48. <head>
  49. <Meta Http-equiv="Content-Type" Content="text/html; CHARSET=UTF-8">
  50. <meta http-equiv="refresh" content="60">
  51. </head>
  52.  
  53. <body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#808080" alink="#000000"
  54. topmargin="0" leftmargin="0">
  55.  
  56.  
  57.  
  58. <table width="100%" border=0 cellspacing="0" cellpadding="2">
  59.     <tr>
  60.         <td nowrap><% =Write (strTitle) %>
  61.             <br><hr width=100% size=1 noshade color=red>
  62.             <% =Write(strJobEta) %>
  63.         </td>
  64.     </tr>
  65. </table>
  66.  
  67. </body>
  68. </html>